<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模块排序</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
       <#include "/view/admin/head.html"/>
    <style type="text/css">
        .table-class{
            width:90%;
            text-align: center;
            border:1px solid #afd9ee;
            margin:0 auto;
            margin-top: 50px;
        }
        .list-path{
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;

        }
        table th{
            text-align: center;
        }
        table thead tr {
            background-color: #9acfea;
        }
        .table-query{
            /*height: 40px;*/
            /*width:80px;*/
            /*text-align: center;*/
            white-space:nowrap;

        }
    </style>
    <script type="text/javascript">
    </script>
</head>
<body>

<#include "/view/admin/listnav.html"/>

<div class="table-class">

    <table class="table table-hover table-bordered" id="tbl">
        <thead>
        <tr>
            <!-- <th>序号</th> -->
            <th>顺序</th>
           <!--  <th>别名</th> -->
            <th>名称</th>
            <th>移动</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <!-- <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td> -->
                <td>${c.value!}</td>
               <!--  <td>${c.name!}</td> -->
                <td>${c.title!}</td>
                <td>
                    <#if c_index != 0>
                        <button class="before-move btn btn-info" onclick="exchange('${c.dataresourceId!}',-1)" >上移</button>
                    </#if>
                    <#if pagination.list?size-1 != c_index>
                        <button class="after-move btn btn-info" onclick="exchange('${c.dataresourceId!}',1)" >下移</button>
                    </#if>

                </td>
                <td>
              
              <#if c.op==1>
            <@shiro.hasPermission name="5.2.1">   
              <a href="${base}/czjtemp/delete?dataresourceId=${c.dataresourceId!}&op=${c.op!}" class="btn btn-primary">点击隐藏</a>
            </@shiro.hasPermission> 
              <#else>
             <@shiro.hasPermission name="5.2.2">  
              <a href="${base}/czjtemp/delete?dataresourceId=${c.dataresourceId!}&op=${c.op!}"  class="btn btn-danger">点击显示</a>
             </@shiro.hasPermission>
              	</#if>
              <@shiro.hasPermission name="5.2.3">  
                <a href="${base}/czjtemp/goupdate?dataresourceId=${c.dataresourceId!}" class="btn btn-primary">修改</a>
              </@shiro.hasPermission>   
               <@shiro.hasPermission name="5.2.4">   
                 <a href="${base}/czjtemp/detail?dataresourceId=${c.dataresourceId!}" class="btn btn-primary">详情</a>
               </@shiro.hasPermission> 
                </td>
            </tr>


        </#list>
        <#if 0==pagination.totalCount>
            <tr>
                <td colspan="7" style="color: red"> 没有相关数据 </td>
            </tr>
        </#if>




        </tbody>
    </table>
    <#include "/view/admin/pagination.html"/>
</div>
<script>
    function exchange(id,sorting){
        location.href="${base}/czjtemp/exchange.do?id="+id+"&sorting="+sorting;

    }



</script>

</body>
</html>
